/*
 * This file is part of Ember.
 *
 * Ember is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Ember is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Ember.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Copyright (C) Grant Tyra 2010
 * granttyra@gmail.com
*/

#ifndef EMBER_STRING_H_
#define EMBER_STRING_H_

#include "ember_config.h"
#include "ember_list.h"

EMBER_EXPORT char *EmberStringCreate(int);
EMBER_EXPORT char *EmberStringFromInt(int);
EMBER_EXPORT char *EmberStringCopy(const char*);
EMBER_EXPORT char *EmberStringSubstring(const char*, int, int);
EMBER_EXPORT char *EmberStringBetween(const char*, char, char);
EMBER_EXPORT char *EmberStringReverseBetween(const char*, char, char);
EMBER_EXPORT char *EmberStringAfterString(const char*, const char*);
EMBER_EXPORT char *EmberStringBeforeString(const char*, const char*);
EMBER_EXPORT char *EmberStringBefore(const char*, char);
EMBER_EXPORT char *EmberStringReverseBefore(const char*, char);
EMBER_EXPORT char *EmberStringAfter(const char*, char);
EMBER_EXPORT char *EmberStringReverseAfter(const char*, char);
EMBER_EXPORT char *EmberStringConcat(const char*, const char*);
EMBER_EXPORT void EmberStringDestroy(char*);

EMBER_EXPORT void EmberStringTrim(char**);
EMBER_EXPORT void EmberStringExpand(char**, int);
EMBER_EXPORT void EmberStringAppend(char**, const char*);

EMBER_EXPORT int EmberStringContains(const char*, char);
EMBER_EXPORT int EmberStringReverseContains(const char*, char);
EMBER_EXPORT int EmberStringContainsString(const char*, const char*);
EMBER_EXPORT int EmberStringReverseContainsString(const char*, const char*);
EMBER_EXPORT int EmberStringFind(const char*, char);
EMBER_EXPORT int EmberStringReverseFind(const char*, char);
EMBER_EXPORT int EmberStringCount(const char*, char);
EMBER_EXPORT int EmberStringFindString(const char*, const char*);
EMBER_EXPORT int EmberStringReverseFindString(const char*, const char*);
EMBER_EXPORT int EmberStringIsValidDecimal(const char*);
EMBER_EXPORT int EmberStringIsValidInteger(const char*);
EMBER_EXPORT int EmberStringHash(const char*);
EMBER_EXPORT int EmberStringStartsWith(const char*, char);
EMBER_EXPORT int EmberStringStartsWithString(const char*, const char*);
EMBER_EXPORT int EmberStringEndsWithString(const char*, const char*);
EMBER_EXPORT int EmberStringIsEmpty(const char*);

EMBER_EXPORT void EmberStringSplit(const char*, char, EmberList*);

#endif
